'use strict';

module.exports = app => {
  const { STRING, TINYINT, DECIMAL } = app.Sequelize;

  const OrderDetail = app.model.define('order_detail', {
    order_id: {
      allowNull: false,
      primaryKey: true,
      type: STRING,
    },
    username: STRING,
    phone: STRING,
    start_city: STRING,
    ender_city: STRING,
    order_status: TINYINT,
    pay_status: TINYINT,
    amount: DECIMAL(8, 2),
  });

  return OrderDetail;
};
